/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.osdtsystem.hierarchy.io;

import java.io.IOException;
import java.net.URL;
import org.osdtsystem.hierarchy.Hierarchy;

/**
 * Interface for a hierarchy manager that can save/load a collection of hierarchies.
 * @author Matthias Buch-Kromann
 */
public interface HierarchyManager {
    public void addWriter(String encodingFormat, HierarchyIO hierarchyWriter);
    public void setReader(String encodingFormat, HierarchyIO hierarchyReader);
    public String hierarchyName(Hierarchy<?> hierarchy);
    public void setHierarchyLocation(String hierarchyName, String encodingFormat, URL url);
    public void addHierarchy(Hierarchy<?> hierarchy, String hierarchyName, String encodingFormat, URL url);
    public void removeHierarchy(String hierarchyName);
    public Hierarchy<?> loadHierarchy(String name) throws IOException;
    public void saveHierarchy(String name) throws IOException;
}
